package com.liu.backstage.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author 腾杰说
 * @since 2020-07-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Syslog对象", description="")
public class Syslog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "访问时间")
    @TableField("visitTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date visitTime;

    @ApiModelProperty(value = "操作者用户名")
    private String username;

    @ApiModelProperty(value = "访问ip")
    private String ip;

    @ApiModelProperty(value = "访问资源url")
    private String url;

    @ApiModelProperty(value = "执行时长")
    @TableField("executionTime")
    private Long executionTime;

    @ApiModelProperty(value = "访问方法")
    private String method;


}
